<?php

namespace Part02_StrategyMode\Code4;

class Context
{
    private $strategyObj;

    public function __construct($strategyObj)
    {
        $this->strategyObj = $strategyObj;
    }

    /**
     * @date: 2021/9/10
     * @desc: 上下文接口,根据具体的策略对象，调用其算法的方法
     */
    public function ContextInterface()
    {
        $this->strategyObj->AlgorithmInterface();
    }
}